Skip to content

e2e: add private registry pull/push regression test#7007

Open
lohitkolluri wants to merge 1 commit into
docker:masterfrom
lohitkolluri:e2e/private-registry-pull-push-5965
Open

e2e: add private registry pull/push regression test#7007
lohitkolluri wants to merge 1 commit into
docker:masterfrom
lohitkolluri:e2e/private-registry-pull-push-5965

Conversation

@lohitkolluri
Copy link
Copy Markdown

@lohitkolluri lohitkolluri commented May 26, 2026

Add a privateregistry service (htpasswd auth, port 5001) to the e2e
compose stack and a TestPullPushPrivateRepository test that verifies:

  • unauthenticated docker push / docker pull is rejected with an auth error
  • authenticated docker push / docker pull succeeds

The volume path in compose-env.yaml is resolved relative to the compose
file directory (e2e/), so ./testdata/registry/auth is used instead of
./e2e/testdata/registry/auth. This was the root cause of CI failures in
the earlier attempt (#6940):
the htpasswd file never mounted, the registry never started, and every
operation timed out with a DNS error.

Regression test for #5963.
Carries forward #6940 (original author: @AryanSharma9917).
Closes #5965.

@lohitkolluri
Copy link
Copy Markdown
Author

Reopened and pushed a fix for the e2e failures in #6940.

Root cause: e2e/compose-env.yaml mounted ./e2e/testdata/registry/auth, but compose resolves volume paths relative to the compose file directory (e2e/), so the htpasswd file was never mounted and privateregistry never started (DNS server misbehaving for the full retry window).

Fix: use ./testdata/registry/auth, rename the service to privateregistry, and add depends_on for the dind engine.

Happy to fold this into #6940 instead if maintainers prefer a single PR.

@lohitkolluri lohitkolluri force-pushed the e2e/private-registry-pull-push-5965 branch 2 times, most recently from aa3a10d to b2e3d39 Compare May 26, 2026 13:46
@lohitkolluri lohitkolluri changed the title e2e/image: add private registry pull/push regression test e2e: add private registry pull/push regression test May 26, 2026
@lohitkolluri
Copy link
Copy Markdown
Author

@vvoland @thaJeztah — when you have a moment, could you please approve the workflow runs for this PR? Any review feedback is very welcome.

Thank you.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 26, 2026

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
e2e/internal/fixtures/fixtures.go 0.00% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@lohitkolluri lohitkolluri force-pushed the e2e/private-registry-pull-push-5965 branch 4 times, most recently from ec2b6e3 to 80f993f Compare May 26, 2026 16:21
@lohitkolluri
Copy link
Copy Markdown
Author

Hi @vvoland @thaJeztah gentle follow-up when you have a moment.

I’ve pushed a new commit that addresses the CI failures reported on this PR, including the private registry setup, registry authentication configuration, and the authenticated push assertion failure. The workflow should now be in a good state.

Could you please:

  1. Approve the workflow runs for this PR (fork workflows are currently awaiting maintainer approval), and
  2. Set the milestone to 29.5.3 so validate-milestone can pass? I don’t have permission to manage milestones on this repository.

Happy to make any further changes if needed. Thanks again for your time and review!

@lohitkolluri lohitkolluri force-pushed the e2e/private-registry-pull-push-5965 branch 2 times, most recently from 434f1aa to febb222 Compare May 27, 2026 15:57
Add a privateregistry service (htpasswd auth, port 5001) to the e2e
compose stack and a TestPullPushPrivateRepository test that verifies:

  - unauthenticated push/pull is rejected with an auth error
  - authenticated push/pull succeeds

Fix private-registry flakiness by moving the registry debug listener off
port 5001 (to avoid conflicting listeners) and fail fast during e2e setup
if supporting services are not running.

The volume path in compose-env.yaml is resolved relative to the compose
file directory (e2e/), so use ./testdata/registry/auth, not
./e2e/testdata/registry/auth.

Regression test for docker#5963.
Closes docker#5965.

Signed-off-by: aryansharma9917 <sharmaaryan9837@gmail.com>
Signed-off-by: Lohit Kolluri <lohitkolluri@gmail.com>
@lohitkolluri lohitkolluri force-pushed the e2e/private-registry-pull-push-5965 branch from febb222 to 236b3d4 Compare May 27, 2026 15:57
@lohitkolluri
Copy link
Copy Markdown
Author

The CI failures were caused by the new private registry service not starting correctly, so the tests spent their whole time waiting for it and eventually timed out with DNS/connection errors.

I fixed it by adjusting the registry config so it can start reliably, and by adding an early “sanity check” in the e2e setup that fails fast and prints the service logs if the registry (or other required services) isn’t actually running. After this change, the private-registry e2e tests should run normally instead of timing out.

@lohitkolluri
Copy link
Copy Markdown
Author

Hi @vvoland @thaJeztah all checks are green on this PR now. Thank you for the earlier workflow approvals.

When you have a moment, could you also approve the workflow runs on my other PR? It’s the same fork-approval situation:

#7008

(container: add --health-cmd-mode for CMD healthcheck form)

Happy to address any feedback on either PR. Thanks again!

@lohitkolluri
Copy link
Copy Markdown
Author

Codecov patch coverage is 0% on e2e/internal/fixtures because unit tests exclude the e2e/ tree; the new lines are covered by TestPullPushPrivateRepository in the e2e suite.

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
e2e/internal/fixtures/fixtures.go 0.00% 3 Missing ⚠️
📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add e2e test for authorized pull/push

3 participants